//
//  DYThemeHotReview.m
//  BaiSi
//
//  Created by mac on 16/11/2.
//  Copyright © 2016年 DeYi. All rights reserved.
//

#import "DYThemeHotReview.h"
#import "DYThemeItem.h"
#import "DYThemeHotReviewItem.h"
#import "DYThemeUserItem.h"

@interface DYThemeHotReview ()
@property (weak, nonatomic) IBOutlet UILabel *contenLabel;
@property (weak, nonatomic) IBOutlet UIView *containView;
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
@property (weak, nonatomic) IBOutlet UIButton *voiceTimeBtn;

@end

@implementation DYThemeHotReview

-(void)awakeFromNib {
//    [self setTranslatesAutoresizingMaskIntoConstraints:NO];
    self.autoresizingMask = UIViewAutoresizingNone;
}

- (void)setItem:(DYThemeItem *)item {
    [super setItem:item];
    if (item.hotItem == nil) return;
    if (item.hotItem.content.length) {
        _containView.hidden = YES;
        _contenLabel.text = item.hotItem.allContent;
        
    } else {
        _containView.hidden = NO;
        _nameLabel.text = item.hotItem.allContent;
        [_voiceTimeBtn setTitle:item.hotItem.voicetime forState:UIControlStateNormal];
       
    }
}

@end
